package a.e.b.a;

import a.e.b.b.t;
import a.e.b.c.cb;
import a.j.ld;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import javax.swing.*;

public class r
  extends q
{
  private static final Icon k;
  private static final Icon l;
  static Class m;
  public static boolean n;
  
  public String a()
  {
    return "GroupNode";
  }
  
  public Class d()
  {
    if (!i.i) {}
    return m == null ? (r.m = c("a.j.a.o")) : m;
  }
  
  public void a(ld paramld, cb paramcb, a.e.b.c.o paramo)
    throws a.e.b.c.a
  {
    boolean bool2 = i.i;
    super.a(paramld, paramcb, paramo);
    a.j.a.o localo = (a.j.a.o)paramld;
    boolean bool1 = localo.h();
    if (!bool2)
    {
      paramcb.a("State", "http://www.yworks.com/xml/graphml").a("innerGraphDisplayEnabled", localo.gb()).a("closed", bool1);
      if (bool1)
      {
        paramcb.a("closedHeight", localo.d()).a("closedWidth", localo.c());
        if (bool2) {
          break label135;
        }
        if (i.h == 0) {
          break label130;
        }
      }
    }
    paramcb.a("closedHeight", localo.fb()).a("closedWidth", localo.eb());
    label130:
    label135:
    if (!bool2)
    {
      if (!localo.hb()) {
        paramcb.c("groupDepthFillColorEnabled", "false");
      }
      paramcb.b();
      if (bool2) {}
    }
    else
    {
      if (localo.sb()) {
        paramcb.a("NodeBounds", "http://www.yworks.com/xml/graphml").c("considerNodeLabelSize", "true").b();
      }
      y.a(paramcb, "Insets", localo.i());
      y.a(paramcb, "BorderInsets", localo.j());
    }
    Icon localIcon1 = localo.cb();
    if (!bool2) {
      if (localIcon1 != k) {
        a(paramcb, "ClosedGroupIcon", localIcon1, paramo);
      }
    }
    Icon localIcon2 = localo.db();
    if (localIcon2 != l) {
      a(paramcb, "OpenGroupIcon", localIcon2, paramo);
    }
  }
  
  private void a(cb paramcb, String paramString, Icon paramIcon, a.e.b.c.o paramo)
  {
    boolean bool = i.i;
    if (!bool)
    {
      paramcb.a(paramString, "http://www.yworks.com/xml/graphml");
      if (paramIcon == null)
      {
        paramcb.a("hasIcon", false);
        if (bool) {
          return;
        }
        if (i.h == 0) {
          break label54;
        }
      }
    }
    y.a(paramcb, "href", paramIcon, paramo);
    label54:
    paramcb.b();
  }
  
  public void a(ld paramld, Node paramNode, t paramt)
    throws a.e.b.b.a
  {
    boolean bool = i.i;
    int j = i.h;
    a.j.a.o localo = (a.j.a.o)paramld;
    localo.b(true);
    super.a(localo, paramNode, paramt);
    localo.g(true);
    NodeList localNodeList = paramNode.getChildNodes();
    if (localNodeList != null)
    {
      int i = 0;
      do
      {
        if (i >= localNodeList.getLength()) {
          break;
        }
        Node localNode1 = localNodeList.item(i);
        if (!bool)
        {
          if (localNode1.getNodeType() == 1)
          {
            String str = localNode1.getLocalName();
            NamedNodeMap localNamedNodeMap;
            Node localNode2;
            if (!bool) {
              if ("State".equals(str))
              {
                localNamedNodeMap = localNode1.getAttributes();
                localNode2 = localNamedNodeMap.getNamedItem("closed");
                if (!bool)
                {
                  if (localNode2 != null) {
                    localo.b(a(localNode2));
                  }
                  localNode2 = localNamedNodeMap.getNamedItem("innerGraphDisplayEnabled");
                }
                if (!bool)
                {
                  if (localNode2 != null) {
                    localo.f(a(localNode2));
                  }
                  localNode2 = localNamedNodeMap.getNamedItem("groupDepthFillColorEnabled");
                }
                if (!bool)
                {
                  if (localNode2 != null) {
                    localo.g(a(localNode2));
                  }
                  localNode2 = localNamedNodeMap.getNamedItem("closedHeight");
                }
                if (!bool)
                {
                  if (localNode2 != null) {
                    localo.i(Double.parseDouble(localNode2.getNodeValue()));
                  }
                  localNode2 = localNamedNodeMap.getNamedItem("closedWidth");
                }
                if (localNode2 != null) {
                  localo.h(Double.parseDouble(localNode2.getNodeValue()));
                }
              }
            }
            if (!bool) {
              if ("NodeBounds".equals(str))
              {
                localNamedNodeMap = localNode1.getAttributes();
                localNode2 = localNamedNodeMap.getNamedItem("considerNodeLabelSize");
                if (localNode2 != null) {
                  localo.h(a(localNode2));
                }
              }
            }
            if (!bool) {
              if ("Insets".equals(str)) {
                localo.b(y.b(localNode1));
              }
            }
            if (!bool) {
              if ("BorderInsets".equals(str)) {
                localo.c(y.b(localNode1));
              }
            }
            if (!bool) {
              if ("ClosedGroupIcon".equals(str)) {
                localo.a(y.a(localNode1, "href", paramt));
              }
            }
            if (bool) {
              continue;
            }
            if ("OpenGroupIcon".equals(str)) {
              localo.b(y.a(localNode1, "href", paramt));
            }
          }
          i++;
        }
      } while (j == 0);
    }
  }
  
  private static boolean a(Node paramNode)
  {
    return Boolean.valueOf(paramNode.getNodeValue()).booleanValue();
  }
  
  static Class c(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  static
  {
    a.j.a.o localo = new a.j.a.o();
    k = localo.cb();
    l = localo.db();
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.b.a.r

 * JD-Core Version:    0.7.0.1

 */